﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed
#pragma once
#include "IPositionGeometry.h"

namespace gcmp
{
    class IDocument;
    /// \brief 点在线上定位类
    class GCMP_MODEL_INTERFACE_EXPORT IPositionPointOnCurve2d : public IPositionGeometry
    {
        DEFINE_CAST_DERIVED(gcmp::IPositionPointOnCurve2d, gcmp::IPositionGeometry)
    public:
    
        /// \brief 创建点在线上的定位对象
        /// \param pDocument 文档指针
        /// \param ownerId 宿主对象
        /// \param position 世界坐标系点
        /// \return 点在线上的定位对象
        static OwnerPtr<IPositionPointOnCurve2d> Create(IElement *pElement, const Vector3d &position);
   
    public:
        /// \brief 根据点得到在基准线上的参数值
        /// \return 参数值
        virtual  double GetParameterOnBaseCurve() const = 0;

        /// \brief 设置参数值
        /// \param parameter 参数值
        /// \return 返回true表示成功设置，否则表示失败 
        virtual bool SetParameterOnBaseCurve(double parameter) = 0;
    };
}


